<?php
declare (strict_types = 1);

namespace app\controller;

use app\Request;

class Company
{
    public function index(){
        $company=new \app\model\Company();
        $companyData=$company->getCompanyData();
        return view('index/list',['data'=>$companyData]);
    }

    public function delCompany($id){
        $company=new \app\model\Company();
        $company->delCompany($id);
        return redirect('company');
    }

    public function updateShow($id){
        $company=new \app\model\Company();
        $companyData=$company->updateShow($id);
        return view('index/updateShow',['data'=>$companyData]);
    }

    public function updateComData(Request $request){
        $data=$request->get();
        $company=new \app\model\Company();
        $companyData=$company->updateComData($data);
        return redirect('company');
    }
}
